// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
// at.alicdn.com/t/font_1164867_8tpi7xlyslo.js
import Vue from 'vue'
import App from './App'
import router from './router'
import './assets/styles/reset.css'
import './assets/styles/border.css'
import './assets/styles/weui.css'
import './assets/styles/weuix.css'
import './assets/styles/iconfont.css'
import './assets/styles/weui.min.css'
// import ElementUI from 'element-ui'
// import '../node_modules/element-ui/lib/theme-chalk/index.css'
import fastClick from 'fastclick'
import axios from 'axios'
import global from './global'

Vue.use(require('vue-wechat-title'))
Vue.config.productionTip = false
// Vue.use(ElementUI)
fastClick.attach(document.body)
Vue.prototype.$axios = axios
Vue.prototype.url = global.url
Vue.prototype.PI = global.PI
Vue.prototype.PR = global.PR
Vue.prototype.assistant = global.assistant
Vue.prototype.student = global.student
Vue.prototype.stranger = global.stranger
Vue.prototype.$global = global
Vue.prototype.TaskWaitForCheck = global.TaskWaitForCheck
Vue.prototype.ProjectWaitForCheck = global.ProjectWaitForCheck
Vue.prototype.Run = global.Run
Vue.prototype.Finished = global.Finished
Vue.prototype.GainWaitForCheck = global.GainWaitForCheck
Vue.prototype.GainYes = global.GainYes
Vue.prototype.GainNo = global.GainNo
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
router.beforeEach((to, from, next) => {
  if (to.meta.title) {
    document.title = to.meta.title
  } else {
    document.title = 'BCI'
  }
  next()
})
